

// source idl: Apps.idl.CooperatorAo.java

#ifndef COOPERATORAO_STUB_4_WEB_H
#define COOPERATORAO_STUB_4_WEB_H

#include <string>
#include <sstream>
#include "app_platform/cmd_obj.h"
#include "app_platform/cgi_stub_cntl.h"
#include "c2cent/base/basestub4web.h"
#include "app_platform/cntl_info.h"
#include "app_platform/intf_serializable.h"
#include "app_platform/intf_service_object.h"
#include "b2b2c/cooperator/po/cooperatormonitormodelpo_cooperator.h"	
#include "b2b2c/cooperator/po/cooperatorsubaccountpo_cooperator.h"	
#include <set>	
#include "b2b2c/cooperator/po/cooperatorpropo_cooperator.h"	
#include <vector>	
#include "b2b2c/cooperator/po/cooperatorbaseinfopo_cooperator.h"	
#include "b2b2c/cooperator/po/cooperatormonitormodelrulepo_cooperator.h"	
#include "b2b2c/cooperator/po/cooperatorlicensepo_cooperator.h"	
#include "b2b2c/cooperator/po/cooperatorsubpropo_cooperator.h"	
#include "b2b2c/cooperator/po/cooperatorsetpo_cooperator.h"	
#include "intf_cooperatorao.h"

namespace b2b2c
{
namespace cooperator
{
namespace ao
{
	#define COOPERATORAO_STUB4WEB_VERSION "B2B2C_COOPERATOR_AO___COOPERATORAO__STUB4WEB_VERSION__1.0 "__DATE__" "__TIME__
    const std::string COOPERATORAO_STUB4WEB_NOUSE = COOPERATORAO_STUB4WEB_VERSION;

	const uint32_t COOPERATORAO_CHECKCOOPERATORPASSWD_REQ_CMD_ID = 0xA0121803; ///检查合作伙伴密码信息请求类 请求命令号
	const uint32_t COOPERATORAO_CHECKCOOPERATORPASSWD_RESP_CMD_ID = 0xA0128803; ///检查合作伙伴密码信息返回类 回应命令号
	

	const uint32_t COOPERATORAO_DELETECOOPERATORMONITORMODEL_REQ_CMD_ID = 0xA012180E; /// 请求命令号
	const uint32_t COOPERATORAO_DELETECOOPERATORMONITORMODEL_RESP_CMD_ID = 0xA012880E; /// 回应命令号
	

	const uint32_t COOPERATORAO_GETCOOPERATORBASEINFO_REQ_CMD_ID = 0xA0121801; ///获取合作伙伴基本信息请求类 请求命令号
	const uint32_t COOPERATORAO_GETCOOPERATORBASEINFO_RESP_CMD_ID = 0xA0128801; ///获取合作伙伴基本信息返回类 回应命令号
	

	const uint32_t COOPERATORAO_GETCOOPERATORBASEINFOLIST_REQ_CMD_ID = 0xA0121807; ///批量获取合作伙伴基本信息请求类 请求命令号
	const uint32_t COOPERATORAO_GETCOOPERATORBASEINFOLIST_RESP_CMD_ID = 0xA0128807; ///批量获取合作伙伴基本信息返回类 回应命令号
	

	const uint32_t COOPERATORAO_GETCOOPERATORIDBYICSONID_REQ_CMD_ID = 0xA012180F; ///根据ERP商户id查询合作伙伴ID请求类 请求命令号
	const uint32_t COOPERATORAO_GETCOOPERATORIDBYICSONID_RESP_CMD_ID = 0xA012880F; ///根据ERP商户id查询合作伙伴ID返回类 回应命令号
	

	const uint32_t COOPERATORAO_GETCOOPERATORKEY_REQ_CMD_ID = 0xA0121808; ///获取合作伙伴数据加密Key请求类 请求命令号
	const uint32_t COOPERATORAO_GETCOOPERATORKEY_RESP_CMD_ID = 0xA0128808; ///获取合作伙伴数据加密Key返回类 回应命令号
	

	const uint32_t COOPERATORAO_GETCOOPERATORLICENSE_REQ_CMD_ID = 0xA0121802; ///获取合作伙伴许可证信息请求类 请求命令号
	const uint32_t COOPERATORAO_GETCOOPERATORLICENSE_RESP_CMD_ID = 0xA0128802; ///获取合作伙伴许可证信息返回类 回应命令号
	

	const uint32_t COOPERATORAO_GETCOOPERATORMONITORMODEL_REQ_CMD_ID = 0xA012180C; /// 请求命令号
	const uint32_t COOPERATORAO_GETCOOPERATORMONITORMODEL_RESP_CMD_ID = 0xA012880C; /// 回应命令号
	

	const uint32_t COOPERATORAO_GETCOOPERATORMONITORMODELLIST_REQ_CMD_ID = 0xA012180B; /// 请求命令号
	const uint32_t COOPERATORAO_GETCOOPERATORMONITORMODELLIST_RESP_CMD_ID = 0xA012880B; /// 回应命令号
	

	const uint32_t COOPERATORAO_LOGISTICSSETCOOPERATORPRO_REQ_CMD_ID = 0xA0121809; ///支付物流系统设置卖家的次日达，货到付款等属性位请求类 请求命令号
	const uint32_t COOPERATORAO_LOGISTICSSETCOOPERATORPRO_RESP_CMD_ID = 0xA0128809; ///支付物流系统设置卖家的次日达，货到付款等属性位返回类 回应命令号
	

	const uint32_t COOPERATORAO_SETCOOPERATORINFO_REQ_CMD_ID = 0xA012180A; ///从管理后台等其他业务同步过来的设置合作伙伴属性位等信息请求类 请求命令号
	const uint32_t COOPERATORAO_SETCOOPERATORINFO_RESP_CMD_ID = 0xA012880A; ///从管理后台等其他业务同步过来的设置合作伙伴属性位等信息返回类 回应命令号
	

	const uint32_t COOPERATORAO_SETCOOPERATORPASSWD_REQ_CMD_ID = 0xA0121805; ///设置合作伙伴密码信息请求类 请求命令号
	const uint32_t COOPERATORAO_SETCOOPERATORPASSWD_RESP_CMD_ID = 0xA0128805; ///设置合作伙伴密码信息返回类 回应命令号
	

	const uint32_t COOPERATORAO_UPDATECOOPERATORBASEINFO_REQ_CMD_ID = 0xA0121804; ///更新【新增和修改】合作伙伴基本信息请求类 请求命令号
	const uint32_t COOPERATORAO_UPDATECOOPERATORBASEINFO_RESP_CMD_ID = 0xA0128804; ///更新【新增和修改】合作伙伴基本信息返回类 回应命令号
	

	const uint32_t COOPERATORAO_UPDATECOOPERATORLICENSE_REQ_CMD_ID = 0xA0121806; ///更新【新增和修改】合作伙伴许可证信息请求类 请求命令号
	const uint32_t COOPERATORAO_UPDATECOOPERATORLICENSE_RESP_CMD_ID = 0xA0128806; ///更新【新增和修改】合作伙伴许可证信息返回类 回应命令号
	

	const uint32_t COOPERATORAO_UPDATECOOPERATORMONITORMODEL_REQ_CMD_ID = 0xA012180D; /// 请求命令号
	const uint32_t COOPERATORAO_UPDATECOOPERATORMONITORMODEL_RESP_CMD_ID = 0xA012880D; /// 回应命令号
	


	const uint16_t COOPERATORAO_MAX_PROTOCAL_VERSION = 2; //>平台支持的最大协议版本号

///////////////////////////// STRUCTS /////////////////////////////////////////////////
	/**
	 *
 	 * 检查合作伙伴密码信息请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CCheckCooperatorPassWdReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint64_t cooperatorId;
		std::string cooperatorPassword;
		std::string inReserve;
		std::string errmsg;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_CHECKCOOPERATORPASSWD_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & cooperatorId;
			bs & cooperatorPassword;
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 检查合作伙伴密码信息返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CCheckCooperatorPassWdResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_CHECKCOOPERATORPASSWD_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CDeleteCooperatorMonitorModelReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint32_t cooperatorId;
		uint32_t modelId;
		std::string inReserve;
		std::string errmsg;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_DELETECOOPERATORMONITORMODEL_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & cooperatorId;
			bs & modelId;
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CDeleteCooperatorMonitorModelResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_DELETECOOPERATORMONITORMODEL_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 获取合作伙伴基本信息请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorBaseInfoReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint64_t cooperatorId;
		std::string inReserve;
		std::string errmsg;
		b2b2c::cooperator::po::CCooperatorBaseInfoPo cooperatorBaseInfoPo;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORBASEINFO_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & cooperatorId;
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 获取合作伙伴基本信息返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorBaseInfoResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		b2b2c::cooperator::po::CCooperatorBaseInfoPo cooperatorBaseInfoPo;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORBASEINFO_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			cooperatorBaseInfoPo.Serialize(bs);
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 批量获取合作伙伴基本信息请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorBaseInfoListReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		std::set<uint64_t > cooperatorId;
		std::string inReserve;
		std::string errmsg;
		std::vector<b2b2c::cooperator::po::CCooperatorBaseInfoPo > cooperatorBaseInfoPo;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORBASEINFOLIST_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & cooperatorId;
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 批量获取合作伙伴基本信息返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorBaseInfoListResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		std::vector<b2b2c::cooperator::po::CCooperatorBaseInfoPo > cooperatorBaseInfoPo;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORBASEINFOLIST_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & cooperatorBaseInfoPo;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 根据ERP商户id查询合作伙伴ID请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorIdByIcsonIdReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint64_t icsonId;
		std::string inReserve;
		std::string errmsg;
		uint64_t cooperatorId;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORIDBYICSONID_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & icsonId;
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 根据ERP商户id查询合作伙伴ID返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorIdByIcsonIdResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		uint64_t cooperatorId;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORIDBYICSONID_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & cooperatorId;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 获取合作伙伴数据加密Key请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorKeyReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint64_t cooperatorId;
		std::string inReserve;
		std::string errmsg;
		std::string sCooperatorKey;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORKEY_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & cooperatorId;
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 获取合作伙伴数据加密Key返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorKeyResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		std::string sCooperatorKey;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORKEY_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & sCooperatorKey;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 获取合作伙伴许可证信息请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorLicenseReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint64_t cooperatorId;
		std::set<uint8_t > licenseType;
		std::string inReserve;
		std::string errmsg;
		std::vector<b2b2c::cooperator::po::CCooperatorLicensePo > cooperatorLicensePo;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORLICENSE_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & cooperatorId;
			bs & licenseType;
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 获取合作伙伴许可证信息返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorLicenseResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		std::vector<b2b2c::cooperator::po::CCooperatorLicensePo > cooperatorLicensePo;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORLICENSE_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & cooperatorLicensePo;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorMonitorModelReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint32_t cooperatorId;
		uint32_t modelId;
		std::string inReserve;
		std::string errmsg;
		b2b2c::cooperator::po::CCooperatorMonitorModelPo CooperatorMonitorModelPo;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORMONITORMODEL_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & cooperatorId;
			bs & modelId;
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorMonitorModelResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		b2b2c::cooperator::po::CCooperatorMonitorModelPo CooperatorMonitorModelPo;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORMONITORMODEL_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			CooperatorMonitorModelPo.Serialize(bs);
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorMonitorModelListReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint32_t cooperatorId;
		std::string inReserve;
		std::string errmsg;
		std::vector<b2b2c::cooperator::po::CCooperatorMonitorModelPo > CooperatorMonitorModelPo;
		std::string rulesruleJson;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORMONITORMODELLIST_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & cooperatorId;
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CGetCooperatorMonitorModelListResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		std::vector<b2b2c::cooperator::po::CCooperatorMonitorModelPo > CooperatorMonitorModelPo;
		std::string rulesruleJson;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_GETCOOPERATORMONITORMODELLIST_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & CooperatorMonitorModelPo;
			bs & rulesruleJson;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 支付物流系统设置卖家的次日达，货到付款等属性位请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CLogisticsSetCooperatorProReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint64_t option;
		b2b2c::cooperator::po::CCooperatorProPo cooperatorProPo;
		std::string inReserve;
		std::string errmsg;
		b2b2c::cooperator::po::CCooperatorBaseInfoPo cooperatorBaseInfoPo;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_LOGISTICSSETCOOPERATORPRO_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & option;
			cooperatorProPo.Serialize(bs);
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 支付物流系统设置卖家的次日达，货到付款等属性位返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CLogisticsSetCooperatorProResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		b2b2c::cooperator::po::CCooperatorBaseInfoPo cooperatorBaseInfoPo;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_LOGISTICSSETCOOPERATORPRO_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			cooperatorBaseInfoPo.Serialize(bs);
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 从管理后台等其他业务同步过来的设置合作伙伴属性位等信息请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CSetCooperatorInfoReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint64_t option;
		b2b2c::cooperator::po::CCooperatorSetPo cooperatorSetPo;
		std::string inReserve;
		std::string errmsg;
		b2b2c::cooperator::po::CCooperatorBaseInfoPo cooperatorBaseInfoPo;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_SETCOOPERATORINFO_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & option;
			cooperatorSetPo.Serialize(bs);
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 从管理后台等其他业务同步过来的设置合作伙伴属性位等信息返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CSetCooperatorInfoResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		b2b2c::cooperator::po::CCooperatorBaseInfoPo cooperatorBaseInfoPo;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_SETCOOPERATORINFO_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			cooperatorBaseInfoPo.Serialize(bs);
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 设置合作伙伴密码信息请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CSetCooperatorPassWdReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		uint64_t cooperatorId;
		std::string cooperatorOldPassword;
		std::string cooperatorNewPassword;
		std::string inReserve;
		std::string errmsg;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_SETCOOPERATORPASSWD_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			bs & cooperatorId;
			bs & cooperatorOldPassword;
			bs & cooperatorNewPassword;
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 设置合作伙伴密码信息返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CSetCooperatorPassWdResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_SETCOOPERATORPASSWD_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 更新【新增和修改】合作伙伴基本信息请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CUpdateCooperatorBaseInfoReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		b2b2c::cooperator::po::CCooperatorBaseInfoPo cooperatorBaseInfoPo;
		std::string inReserve;
		std::string errmsg;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_UPDATECOOPERATORBASEINFO_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			cooperatorBaseInfoPo.Serialize(bs);
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 更新【新增和修改】合作伙伴基本信息返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CUpdateCooperatorBaseInfoResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_UPDATECOOPERATORBASEINFO_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 更新【新增和修改】合作伙伴许可证信息请求类
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CUpdateCooperatorLicenseReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		b2b2c::cooperator::po::CCooperatorLicensePo cooperatorLicensePo;
		std::string inReserve;
		std::string errmsg;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_UPDATECOOPERATORLICENSE_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			cooperatorLicensePo.Serialize(bs);
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 更新【新增和修改】合作伙伴许可证信息返回类
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CUpdateCooperatorLicenseResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_UPDATECOOPERATORLICENSE_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	/**
	 *
 	 * 
	 *
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CUpdateCooperatorMonitorModelReq : public IServiceObject, public ISerializableXML
	{
		std::string machineKey;
		std::string source;
		uint32_t sceneId;
		b2b2c::cooperator::po::CCooperatorMonitorModelPo CooperatorMonitorModelPo;
		std::string inReserve;
		std::string errmsg;
		std::string outReserve;
		
	    virtual uint32_t getCmdId() const { return COOPERATORAO_UPDATECOOPERATORMONITORMODEL_REQ_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
			//检查协议的版本号
		    //if(bs.getVersion() > COOPERATORAO_MAX_PROTOCAL_VERSION)
		    //return false;
			bs & machineKey;
			bs & source;
			bs & sceneId;
			CooperatorMonitorModelPo.Serialize(bs);
			bs & inReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	
	/**
	 *
 	 * 
	 *
 	 * @date 2013-08-01 20:34:10
 	 * @version 0
	 */	
	struct CUpdateCooperatorMonitorModelResp : public IServiceObject, public ISerializableXML
	{
		uint32_t dwResult;
		std::string errmsg;
		std::string outReserve;
	
	    virtual uint32_t getCmdId() const { return COOPERATORAO_UPDATECOOPERATORMONITORMODEL_RESP_CMD_ID; }
		virtual bool Serialize(CByteStreamNetwork& bs)
		{
		    bs & dwResult;
			bs & errmsg;
			bs & outReserve;
		    return bs.isGood();
		}
	    virtual void Dump(std::ostream& os)	{}
	
		virtual bool FromXML(const std::string& sXMLContent) { return true; }
		virtual bool ToXML(std::string& sXMLContent) { return true; }
	};
	class CCooperatorAoStub4Web : public c2cent::b2b2c_define, public ICooperatorAo	{
		public:
			uint32_t CheckCooperatorPassWd(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t cooperatorId,
				const std::string& cooperatorPassword,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
			);
			uint32_t DeleteCooperatorMonitorModel(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t cooperatorId,
				uint32_t modelId,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
			);
			uint32_t GetCooperatorBaseInfo(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t cooperatorId,
				const std::string& inReserve,
				std::string& errmsg,
				b2b2c::cooperator::po::CCooperatorBaseInfoPo& cooperatorBaseInfoPo,
				std::string& outReserve
			);
			uint32_t GetCooperatorBaseInfoList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint64_t >& cooperatorId,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<b2b2c::cooperator::po::CCooperatorBaseInfoPo >& cooperatorBaseInfoPo,
				std::string& outReserve
			);
			uint32_t GetCooperatorIdByIcsonId(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t icsonId,
				const std::string& inReserve,
				std::string& errmsg,
				uint64_t& cooperatorId,
				std::string& outReserve
			);
			uint32_t GetCooperatorKey(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t cooperatorId,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& sCooperatorKey,
				std::string& outReserve
			);
			uint32_t GetCooperatorLicense(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t cooperatorId,
				const std::set<uint8_t >& licenseType,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<b2b2c::cooperator::po::CCooperatorLicensePo >& cooperatorLicensePo,
				std::string& outReserve
			);
			uint32_t GetCooperatorMonitorModel(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t cooperatorId,
				uint32_t modelId,
				const std::string& inReserve,
				std::string& errmsg,
				b2b2c::cooperator::po::CCooperatorMonitorModelPo& CooperatorMonitorModelPo,
				std::string& outReserve
			);
			uint32_t GetCooperatorMonitorModelList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t cooperatorId,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<b2b2c::cooperator::po::CCooperatorMonitorModelPo >& CooperatorMonitorModelPo,
				std::string& rulesruleJson,
				std::string& outReserve
			);
			uint32_t LogisticsSetCooperatorPro(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t option,
				const b2b2c::cooperator::po::CCooperatorProPo& cooperatorProPo,
				const std::string& inReserve,
				std::string& errmsg,
				b2b2c::cooperator::po::CCooperatorBaseInfoPo& cooperatorBaseInfoPo,
				std::string& outReserve
			);
			uint32_t SetCooperatorInfo(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t option,
				const b2b2c::cooperator::po::CCooperatorSetPo& cooperatorSetPo,
				const std::string& inReserve,
				std::string& errmsg,
				b2b2c::cooperator::po::CCooperatorBaseInfoPo& cooperatorBaseInfoPo,
				std::string& outReserve
			);
			uint32_t SetCooperatorPassWd(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t cooperatorId,
				const std::string& cooperatorOldPassword,
				const std::string& cooperatorNewPassword,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
			);
			uint32_t UpdateCooperatorBaseInfo(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const b2b2c::cooperator::po::CCooperatorBaseInfoPo& cooperatorBaseInfoPo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
			);
			uint32_t UpdateCooperatorLicense(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const b2b2c::cooperator::po::CCooperatorLicensePo& cooperatorLicensePo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
			);
			uint32_t UpdateCooperatorMonitorModel(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const b2b2c::cooperator::po::CCooperatorMonitorModelPo& CooperatorMonitorModelPo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
			);
	};
	
	/**
	 *
 	 * 检查合作伙伴密码信息
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint64_t cooperatorId: 合作伙伴ID或合作伙伴子帐号ID，必填 				
		 *@param String cooperatorPassword: 合作伙伴密码（三次MD5加密），必填 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::CheckCooperatorPassWd(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t cooperatorId,
				const std::string& cooperatorPassword,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		 CCheckCooperatorPassWdReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorId = cooperatorId;
			oReq.cooperatorPassword = cooperatorPassword;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_CHECKCOOPERATORPASSWD_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_CHECKCOOPERATORPASSWD_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CCheckCooperatorPassWdResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 删除告警模版
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint32_t cooperatorId: 合作伙伴ID或合作伙伴子帐号ID，必填 				
		 *@param uint32_t modelId: 模版ID，必填 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::DeleteCooperatorMonitorModel(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t cooperatorId,
				uint32_t modelId,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		 CDeleteCooperatorMonitorModelReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorId = cooperatorId;
			oReq.modelId = modelId;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_DELETECOOPERATORMONITORMODEL_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_DELETECOOPERATORMONITORMODEL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CDeleteCooperatorMonitorModelResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 获取合作伙伴基本信息，该接口没进行操作者验证和鉴权，合作伙伴敏感信息无法拉取
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint64_t cooperatorId: 合作伙伴ID或合作伙伴子帐号ID，必填 				
		 *@param String inReserve: 请求保留字 				
		 *@param String errmsg: 错误信息 		
		 *@param CooperatorBaseInfoPo cooperatorBaseInfoPo: 合作伙伴基本信息，如果传入合作伙伴ID则返回全部合作伙伴信息；如果传入合作伙伴子帐号，则只返回该合作伙伴子帐号信息 		
		 *@param String outReserve: 输出保留字 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::GetCooperatorBaseInfo(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t cooperatorId,
				const std::string& inReserve,
				std::string& errmsg,
				b2b2c::cooperator::po::CCooperatorBaseInfoPo& cooperatorBaseInfoPo,
				std::string& outReserve
	)
	{
		 CGetCooperatorBaseInfoReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorId = cooperatorId;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.cooperatorBaseInfoPo = cooperatorBaseInfoPo;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_GETCOOPERATORBASEINFO_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_GETCOOPERATORBASEINFO_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGetCooperatorBaseInfoResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			cooperatorBaseInfoPo  = oResp.cooperatorBaseInfoPo;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 批量获取合作伙伴基本信息
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param Set cooperatorId: 合作伙伴Id_List，必填 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param Vector cooperatorBaseInfoPo: 批量获取的合作伙伴基本信息List 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::GetCooperatorBaseInfoList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const std::set<uint64_t >& cooperatorId,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<b2b2c::cooperator::po::CCooperatorBaseInfoPo >& cooperatorBaseInfoPo,
				std::string& outReserve
	)
	{
		 CGetCooperatorBaseInfoListReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorId = cooperatorId;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.cooperatorBaseInfoPo = cooperatorBaseInfoPo;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_GETCOOPERATORBASEINFOLIST_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_GETCOOPERATORBASEINFOLIST_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGetCooperatorBaseInfoListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			cooperatorBaseInfoPo  = oResp.cooperatorBaseInfoPo;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 根据ERP商户id查询合作伙伴ID
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint64_t icsonId: 易迅Id，必填 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param uint64_t cooperatorId: 获取到的合作伙伴ID 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::GetCooperatorIdByIcsonId(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t icsonId,
				const std::string& inReserve,
				std::string& errmsg,
				uint64_t& cooperatorId,
				std::string& outReserve
	)
	{
		 CGetCooperatorIdByIcsonIdReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.icsonId = icsonId;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.cooperatorId = cooperatorId;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_GETCOOPERATORIDBYICSONID_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_GETCOOPERATORIDBYICSONID_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGetCooperatorIdByIcsonIdResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			cooperatorId  = oResp.cooperatorId;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 获取合作伙伴数据加密Key
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint64_t cooperatorId: 合作伙伴ID或合作伙伴子帐号ID，必填 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param String sCooperatorKey: 合作伙伴数据加密Key，长度32bytes；生成规则：合作伙伴当前密码三次MD5加密后的值 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::GetCooperatorKey(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t cooperatorId,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& sCooperatorKey,
				std::string& outReserve
	)
	{
		 CGetCooperatorKeyReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorId = cooperatorId;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.sCooperatorKey = sCooperatorKey;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_GETCOOPERATORKEY_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_GETCOOPERATORKEY_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGetCooperatorKeyResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			sCooperatorKey  = oResp.sCooperatorKey;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 获取合作伙伴许可证信息
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint64_t cooperatorId: 合作伙伴ID或合作伙伴子帐号ID，必填 				
		 *@param Set licenseType: 许可证类型，为空则为全部许可证列表 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param Vector cooperatorLicensePo: 合作伙伴许可证信息 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::GetCooperatorLicense(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t cooperatorId,
				const std::set<uint8_t >& licenseType,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<b2b2c::cooperator::po::CCooperatorLicensePo >& cooperatorLicensePo,
				std::string& outReserve
	)
	{
		 CGetCooperatorLicenseReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorId = cooperatorId;
			oReq.licenseType = licenseType;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.cooperatorLicensePo = cooperatorLicensePo;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_GETCOOPERATORLICENSE_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_GETCOOPERATORLICENSE_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGetCooperatorLicenseResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			cooperatorLicensePo  = oResp.cooperatorLicensePo;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 通过模版ID获取告警模版
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint32_t cooperatorId: 合作伙伴ID或合作伙伴子帐号ID，必填 				
		 *@param uint32_t modelId: 模版ID，必填 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param CooperatorMonitorModelPo CooperatorMonitorModelPo: 告警模版 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::GetCooperatorMonitorModel(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t cooperatorId,
				uint32_t modelId,
				const std::string& inReserve,
				std::string& errmsg,
				b2b2c::cooperator::po::CCooperatorMonitorModelPo& CooperatorMonitorModelPo,
				std::string& outReserve
	)
	{
		 CGetCooperatorMonitorModelReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorId = cooperatorId;
			oReq.modelId = modelId;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.CooperatorMonitorModelPo = CooperatorMonitorModelPo;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_GETCOOPERATORMONITORMODEL_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_GETCOOPERATORMONITORMODEL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGetCooperatorMonitorModelResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			CooperatorMonitorModelPo  = oResp.CooperatorMonitorModelPo;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 获取价格告警模版列表
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint32_t cooperatorId: 合作伙伴ID或合作伙伴子帐号ID，必填 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param Vector CooperatorMonitorModelPo: 告警模版列表 		
		 *@param String rulesruleJson: 规则的规则json字符串 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::GetCooperatorMonitorModelList(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint32_t cooperatorId,
				const std::string& inReserve,
				std::string& errmsg,
				std::vector<b2b2c::cooperator::po::CCooperatorMonitorModelPo >& CooperatorMonitorModelPo,
				std::string& rulesruleJson,
				std::string& outReserve
	)
	{
		 CGetCooperatorMonitorModelListReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorId = cooperatorId;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.CooperatorMonitorModelPo = CooperatorMonitorModelPo;
			oReq.rulesruleJson = rulesruleJson;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_GETCOOPERATORMONITORMODELLIST_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_GETCOOPERATORMONITORMODELLIST_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CGetCooperatorMonitorModelListResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			CooperatorMonitorModelPo  = oResp.CooperatorMonitorModelPo;
			rulesruleJson  = oResp.rulesruleJson;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 支付物流系统设置卖家的次日达，货到付款等属性位接口
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint64_t option: 选项,暂未用 				
		 *@param CooperatorProPo cooperatorProPo: 合作伙伴属性位设置，包括合作伙伴ID、设置和取消属性值设置的参数（设置和取消的属性位不能冲突），必填 				
		 *@param String inReserve: 请求保留字 				
		 *@param String errmsg: 错误信息 		
		 *@param CooperatorBaseInfoPo cooperatorBaseInfoPo: bitset作为回autogen生成的代码有问题，这里定义成po的形式，请取其中的cooperatorproperty属性值字段 		
		 *@param String outReserve: 输出保留字 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::LogisticsSetCooperatorPro(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t option,
				const b2b2c::cooperator::po::CCooperatorProPo& cooperatorProPo,
				const std::string& inReserve,
				std::string& errmsg,
				b2b2c::cooperator::po::CCooperatorBaseInfoPo& cooperatorBaseInfoPo,
				std::string& outReserve
	)
	{
		 CLogisticsSetCooperatorProReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.cooperatorProPo = cooperatorProPo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.cooperatorBaseInfoPo = cooperatorBaseInfoPo;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_LOGISTICSSETCOOPERATORPRO_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_LOGISTICSSETCOOPERATORPRO_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CLogisticsSetCooperatorProResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			cooperatorBaseInfoPo  = oResp.cooperatorBaseInfoPo;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 从管理后台等其他业务同步过来的设置合作伙伴属性位等信息的接口
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint64_t option: 选项,暂未用 				
		 *@param CooperatorSetPo cooperatorSetPo: 合作伙伴属性位设置，包括合作伙伴ID、设置和取消属性值设置的参数（设置和取消的属性位不能冲突）等，必填 				
		 *@param String inReserve: 请求保留字 				
		 *@param String errmsg: 错误信息 		
		 *@param CooperatorBaseInfoPo cooperatorBaseInfoPo: 设置合作伙伴信息成功后，返回合作伙伴全部的基本信息 		
		 *@param String outReserve: 输出保留字 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::SetCooperatorInfo(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t option,
				const b2b2c::cooperator::po::CCooperatorSetPo& cooperatorSetPo,
				const std::string& inReserve,
				std::string& errmsg,
				b2b2c::cooperator::po::CCooperatorBaseInfoPo& cooperatorBaseInfoPo,
				std::string& outReserve
	)
	{
		 CSetCooperatorInfoReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.option = option;
			oReq.cooperatorSetPo = cooperatorSetPo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.cooperatorBaseInfoPo = cooperatorBaseInfoPo;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_SETCOOPERATORINFO_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_SETCOOPERATORINFO_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CSetCooperatorInfoResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			cooperatorBaseInfoPo  = oResp.cooperatorBaseInfoPo;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 设置合作伙伴密码信息
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param uint64_t cooperatorId: 合作伙伴ID或合作伙伴子帐号ID，必填 				
		 *@param String cooperatorOldPassword: 合作伙伴老密码（三次MD5加密），必填 				
		 *@param String cooperatorNewPassword: 合作伙伴新密码（三次MD5加密），必填 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::SetCooperatorPassWd(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				uint64_t cooperatorId,
				const std::string& cooperatorOldPassword,
				const std::string& cooperatorNewPassword,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		 CSetCooperatorPassWdReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorId = cooperatorId;
			oReq.cooperatorOldPassword = cooperatorOldPassword;
			oReq.cooperatorNewPassword = cooperatorNewPassword;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_SETCOOPERATORPASSWD_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_SETCOOPERATORPASSWD_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CSetCooperatorPassWdResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 更新【新增和修改】合作伙伴基本信息
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param CooperatorBaseInfoPo cooperatorBaseInfoPo: 合作伙伴基本信息，必填；新增时，必须新增合作伙伴信息，然后增加子帐号信息；必须先新增合作伙伴；如只更新合作伙伴子帐号信息，则只需传入合作伙伴ID和对应的子帐号信息列表 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::UpdateCooperatorBaseInfo(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const b2b2c::cooperator::po::CCooperatorBaseInfoPo& cooperatorBaseInfoPo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		 CUpdateCooperatorBaseInfoReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorBaseInfoPo = cooperatorBaseInfoPo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_UPDATECOOPERATORBASEINFO_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_UPDATECOOPERATORBASEINFO_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CUpdateCooperatorBaseInfoResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 更新【新增和修改】合作伙伴许可证信息
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param CooperatorLicensePo cooperatorLicensePo: 合作伙伴许可证信息，必填 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::UpdateCooperatorLicense(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const b2b2c::cooperator::po::CCooperatorLicensePo& cooperatorLicensePo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		 CUpdateCooperatorLicenseReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.cooperatorLicensePo = cooperatorLicensePo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_UPDATECOOPERATORLICENSE_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_UPDATECOOPERATORLICENSE_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CUpdateCooperatorLicenseResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
	/**
	 *
 	 * 新增或者更新告警模版
	 *
		 *@param String machineKey: 机器码，必填 				
		 *@param String source: 调用来源，必填 				
		 *@param uint32_t sceneId: 场景id，必填 				
		 *@param CooperatorMonitorModelPo CooperatorMonitorModelPo: 告警模版，必填 				
		 *@param String inReserve: 请求保留字段 				
		 *@param String errmsg: 错误信息 		
		 *@param String outReserve: 请求保留字段 		
     *
     *@return uint32_t : 0(成功) 其它失败
	 */	
	inline uint32_t CCooperatorAoStub4Web::UpdateCooperatorMonitorModel(
				const CCntlInfo& rCntlInfo,

				const std::string& machineKey,
				const std::string& source,
				uint32_t sceneId,
				const b2b2c::cooperator::po::CCooperatorMonitorModelPo& CooperatorMonitorModelPo,
				const std::string& inReserve,
				std::string& errmsg,
				std::string& outReserve
	)
	{
		 CUpdateCooperatorMonitorModelReq oReq;
			oReq.machineKey = machineKey;
			oReq.source = source;
			oReq.sceneId = sceneId;
			oReq.CooperatorMonitorModelPo = CooperatorMonitorModelPo;
			oReq.inReserve = inReserve;
			oReq.errmsg = errmsg;
			oReq.outReserve = outReserve;
		 
		// CCGI_STUB_CNTL->setRouteKey(uint32_t routeKey); 没有设置routeKey  
		
	    CCGI_STUB_CNTL->setPassport(
	        rCntlInfo.getOperatorUin(), 
	        rCntlInfo.getOperatorKey().c_str(),
	        rCntlInfo.getOperatorClientIP());
	
		if(const_cast<CCntlInfo&>(rCntlInfo).isRouteKeySet())	
			CCGI_STUB_CNTL->setUin(const_cast<CCntlInfo&>(rCntlInfo).getRouteKey());	
	    
	    int iRetCode = 0;
		m_sErrMsg.clear();
		if((iRetCode = CCGI_STUB_CNTL->putSvcObj(&oReq, 0)) != 0)
	    {
			m_sErrMsg = "DoRequest failed: ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
	        return iRetCode;
	    }
	    
	    // Send & Recv
		if((iRetCode = SendRecv()) != 0)
		{
			if(99 == iRetCode) // UDP & Need No Response
				return 0;
	
			std::stringstream oss;
			oss << m_lTimeout;
	        m_sErrMsg = "Send & Recv Timeout(";
			m_sErrMsg += oss.str();
			m_sErrMsg += "s) ";
			m_sErrMsg += CCGI_STUB_CNTL->GetLastErrMsg();
			return iRetCode;
	    }
	    
		if(!m_poCmd->isValid(COOPERATORAO_UPDATECOOPERATORMONITORMODEL_RESP_CMD_ID))
	    {
	        std::stringstream oss;
            oss << "Cmd not match: "
                << "Expected cmd=" << std::hex << COOPERATORAO_UPDATECOOPERATORMONITORMODEL_RESP_CMD_ID << std::dec << " != "
                << "actualed cmd=" << std::hex << m_poCmd->getCmdId() << std::dec;
            m_sErrMsg = oss.str();
        
	        return 0xEE0024;
	    }
	    
	    char* pBuf = NULL; uint32_t nLen = 0;
	    m_poCmd->getBuffer(pBuf, nLen);
	    CByteStreamNetwork bs(pBuf, nLen);
	    bs.isStoring(false);
	    
	    CUpdateCooperatorMonitorModelResp oResp;
	    if(!oResp.Serialize(bs))
	    {
	        m_sErrMsg = "Resp.Serialize(bs) failed";
	        return 0xEE0028;
	    }
		    
			errmsg  = oResp.errmsg;
			outReserve  = oResp.outReserve;
		    
		return oResp.dwResult;
	}
		
}
}
}

#endif /* COOPERATORAO_STUB_4_WEB_H */
